import { IsOptional, IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class FindOneByUsername {
  @ApiProperty({
    description: '用户名',
    required: true,
  })
  @IsString()
  username: string;

  @ApiProperty({
    description: '密码',
    required: true,
  })
  @IsOptional()
  @IsString()
  password?: string;
}
